package top.whysu.edevice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import top.whysu.edevice.dtu.server.SocketServer;

@SpringBootApplication
@MapperScan("top.whysu.edevice.dao")
public class EdeviceApplication {

    public static void main(String[] args) {
        //获取application的上下文
        ApplicationContext applicationContext = SpringApplication.run(EdeviceApplication.class, args);

        /**
         * 启动netty dtu的服务端
         */
        SocketServer socketServer = applicationContext.getBean(SocketServer.class);
        socketServer.start();
    }

}
